<script setup>
import {onMounted, ref} from "vue";
import axios from "axios";
onMounted(() => {
  // 获取数据
  axios.get("/api/list")
      .then((res) => {
        tableData.value = res.data
      })
})

const tableData = ref([])

</script>

<template>
  <el-button>新增部门</el-button>
  <el-table :data="tableData">
    <el-table-column property="" label="序号">
      <template #default="scope">
        {{scope.$index + 1}}
      </template>
    </el-table-column>
    <el-table-column property="deptName" label="部门名称"></el-table-column>
    <el-table-column property="updateTime" label="最后操作时间"></el-table-column>
    <el-table-column property="" label="操作">
      <template #default="scope">
        <el-button text>编辑</el-button>
        <el-button text>删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<style scoped>

</style>
